package com.chanta.server.persistence;

import java.util.Set;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

/**
 * 
 * TODO Please comment this class..
 * 
 * @author Hakan Özdemir - Vendoo Inc.
 * @date 06.11.2013
 * 
 */
@PersistenceCapable
public class Library {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;

	@Persistent
	private Set<Key> rules;

	@Persistent
	private String name;

	@Persistent
	private String description;

	@Persistent
	private String state;

	/** do not rename */
	@Persistent
	private Portal portal;

	@Persistent
	private Set<Key> items;

	/**
	 * Getter for rules.
	 * 
	 * @return rules
	 */
	public Set<Key> getRules() {
		return rules;
	}

	/**
	 * Setter for rules.
	 * 
	 * @param rules
	 *            the rules to set
	 */
	public void setRules(Set<Key> rules) {
		this.rules = rules;
	}

	/**
	 * Getter for name.
	 * 
	 * @return name
	 */
	public String getName() {
		return name;
	}

	/**
	 * Setter for name.
	 * 
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * Getter for description.
	 * 
	 * @return description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * Setter for description.
	 * 
	 * @param description
	 *            the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * Getter for state.
	 * 
	 * @return state
	 */
	public String getState() {
		return state;
	}

	/**
	 * Setter for state.
	 * 
	 * @param state
	 *            the state to set
	 */
	public void setState(String state) {
		this.state = state;
	}

	/**
	 * Getter for portal.
	 * 
	 * @return portal
	 */
	public Portal getPortal() {
		return portal;
	}

	/**
	 * Setter for portal.
	 * 
	 * @param portal
	 *            the portal to set
	 */
	public void setPortal(Portal portal) {
		this.portal = portal;
	}

	/**
	 * Getter for items.
	 * 
	 * @return items
	 */
	public Set<Key> getItems() {
		return items;
	}

	/**
	 * Setter for items.
	 * 
	 * @param items
	 *            the items to set
	 */
	public void setItems(Set<Key> items) {
		this.items = items;
	}
}
